import { post, get } from '../request.js'

/**
 * 区域列表
 * @param {*} params
 * @returns
 */
export const areaList = params => {
	return post({
		url: '/dashboard/home/statAllAreaInfo',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}

/**
 * 事件统计接口
 */
export const eventStatis = params => {
	return get({
		url: '/dashboard/home/statDealData',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}

/**
 * 事件列表接口
 */
export const eventList = params => {
	return post({
		url: '/dashboard/home/statApplyInfo',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}
/**
 * 绿地分析接口
 */
export const getGreenPer = params => {
	return post({
		url: '/dashboard/forecast/getGreenPer',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}

/**
 * 设备类型接口
 */
export const deviceType = params => {
	return get({
		url: '/dashboard/monitor/getAreaDeviceType',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}


/**
 * 设备列表接口
 */
export const deviceList = params => {
	return get({
		url: '/dashboard/monitor/getAreaDeviceList',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}

/**
 * 设备数据接口
 */
export const deviceData = params => {
	return get({
		url: '/dashboard/monitor/getDeviceData',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}

/**
 * 查询预警的项目列表
 */
export const warnAreaList = params => {
	return get({
		url: '/dashboard/monitor/getWarnProject',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}

/**
 * 查询预警的项目下的预警设备列表
 */
export const warnAreaByDeviceList = params => {
	return get({
		url: '/dashboard/monitor/getProjectWarnDevice',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}

/**
 * 查询预警的项目下的预警设备详情数据
 */
export const warnAreaByDeviceInfoData = params => {
	return get({
		url: '/dashboard/monitor/getWarnData',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}

/**
 * 查询预警的项目下的预警数据前十条
 */
export const warnAreaByDeviceDataList = params => {
	return get({
		url: 'dashboard/monitor/getTopTen',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}

/**
 * 查询预测项目列表接口
 */
export const forecastAreaDataList = params => {
	return get({
		url: 'dashboard/forecast/getForecastData',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}
/**
 * 查询预测项目列表子区域列表接口
 */
export const forecastAreaDataListByChild = params => {
	return get({
		url: 'dashboard/forecast/getForecastDetailList',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}
/**
 * 删除预测项目列表子区域接口
 */

export const deleteForecastAreaDataListByChild = params => {
	return post({
		url: 'dashboard/forecast/delete',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}
/**
 * 新增预测项目列表子区域接口
 */
export const saveForecastAreaDataListByChild = params => {
	return post({
		url: 'dashboard/forecast/save',
		params,
		headers: {
			contentType: 'application/json'
		}
	})
}



